<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        [v-cloak]{
            display:none;
        }
    </style>
    <script type='text/javascript' src='../js/vue.js'></script>
    <script type='text/javascript' src=''></script>

</head>

<body>
    <!-- 
        v-pre:
            1、跳过其所在节点的编译过程
            2、利用它跳过没有使用指令语法、没有使用插值语法的节点，会加快编译
     -->
    <div id="root">
        <h1 v-pre>HELLO</h1>
        <div v-once>初始化n值：{{n}}</div>
        <div>当前n值：{{n}}</div>
        <button @click="n++">点击n+1</button>
    </div>
    <script>
        Vue.config.productionTip = false;

        new Vue({
            el: '#root',
            data: {
                n:1
            }

        })
    </script>
</body>

</html>